3.166 \(\int \frac {(a+b \sinh (e+f x))^2}{c+d x} \, dx\)

Optimal. Leaf size=156 \[ \frac {a^2 \log (c+d x)}{d}+\frac {2 a b \text {Chi}\left (x f+\frac {c f}{d}\right ) \sinh \left (e-\frac {c f}{d}\right )}{d}+\frac {2 a b \cosh \left (e-\frac {c f}{d}\right ) \text {Shi}\left (x f+\frac {c f}{d}\right )}{d}+\frac {b^2 \text {Chi}\left (2 x f+\frac {2 c f}{d}\right ) \cosh \left (2 e-\frac {2 c f}{d}\right )}{2 d}+\frac {b^2 \sinh \left (2 e-\frac {2 c f}{d}\right ) \text {Shi}\left (2 x f+\frac {2 c f}{d}\right )}{2 d}-\frac {b^2 \log (c+d x)}{2 d} \]

[Out]

1/2*b^2*Chi(2*c*f/d+2*f*x)*cosh(-2*e+2*c*f/d)/d+a^2*ln(d*x+c)/d-1/2*b^2*ln(d*x+c)/d+2*a*b*cosh(-e+c*f/d)*Shi(c
*f/d+f*x)/d-1/2*b^2*Shi(2*c*f/d+2*f*x)*sinh(-2*e+2*c*f/d)/d-2*a*b*Chi(c*f/d+f*x)*sinh(-e+c*f/d)/d

________________________________________________________________________________________

Rubi [A]  time = 0.33, antiderivative size = 156, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 5, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3317, 3303, 3298, 3301, 3312} \[ \frac {a^2 \log (c+d x)}{d}+\frac {2 a b \text {Chi}\left (x f+\frac {c f}{d}\right ) \sinh \left (e-\frac {c f}{d}\right )}{d}+\frac {2 a b \cosh \left (e-\frac {c f}{d}\right ) \text {Shi}\left (x f+\frac {c f}{d}\right )}{d}+\frac {b^2 \text {Chi}\left (2 x f+\frac {2 c f}{d}\right ) \cosh \left (2 e-\frac {2 c f}{d}\right )}{2 d}+\frac {b^2 \sinh \left (2 e-\frac {2 c f}{d}\right ) \text {Shi}\left (2 x f+\frac {2 c f}{d}\right )}{2 d}-\frac {b^2 \log (c+d x)}{2 d} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Sinh[e + f*x])^2/(c + d*x),x]

[Out]

(b^2*Cosh[2*e - (2*c*f)/d]*CoshIntegral[(2*c*f)/d + 2*f*x])/(2*d) + (a^2*Log[c + d*x])/d - (b^2*Log[c + d*x])/
(2*d) + (2*a*b*CoshIntegral[(c*f)/d + f*x]*Sinh[e - (c*f)/d])/d + (2*a*b*Cosh[e - (c*f)/d]*SinhIntegral[(c*f)/
d + f*x])/d + (b^2*Sinh[2*e - (2*c*f)/d]*SinhIntegral[(2*c*f)/d + 2*f*x])/(2*d)

Rule 3298

Int[sin[(e_.) + (Complex[0, fz_])*(f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[(I*SinhIntegral[(c*f*fz)
/d + f*fz*x])/d, x] /; FreeQ[{c, d, e, f, fz}, x] && EqQ[d*e - c*f*fz*I, 0]

Rule 3301

Int[sin[(e_.) + (Complex[0, fz_])*(f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[CoshIntegral[(c*f*fz)/d
+ f*fz*x]/d, x] /; FreeQ[{c, d, e, f, fz}, x] && EqQ[d*(e - Pi/2) - c*f*fz*I, 0]

Rule 3303

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Dist[Cos[(d*e - c*f)/d], Int[Sin[(c*f)/d + f*x]
/(c + d*x), x], x] + Dist[Sin[(d*e - c*f)/d], Int[Cos[(c*f)/d + f*x]/(c + d*x), x], x] /; FreeQ[{c, d, e, f},
x] && NeQ[d*e - c*f, 0]

Rule 3312

Int[((c_.) + (d_.)*(x_))^(m_)*sin[(e_.) + (f_.)*(x_)]^(n_), x_Symbol] :> Int[ExpandTrigReduce[(c + d*x)^m, Sin
[e + f*x]^n, x], x] /; FreeQ[{c, d, e, f, m}, x] && IGtQ[n, 1] && ( !RationalQ[m] || (GeQ[m, -1] && LtQ[m, 1])
)

Rule 3317

Int[((c_.) + (d_.)*(x_))^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Int[ExpandIntegrand[
(c + d*x)^m, (a + b*Sin[e + f*x])^n, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[n, 0] && (EqQ[n, 1] ||
IGtQ[m, 0] || NeQ[a^2 - b^2, 0])

Rubi steps

\begin {align*} \int \frac {(a+b \sinh (e+f x))^2}{c+d x} \, dx &=\int \left (\frac {a^2}{c+d x}+\frac {2 a b \sinh (e+f x)}{c+d x}+\frac {b^2 \sinh ^2(e+f x)}{c+d x}\right ) \, dx\\ &=\frac {a^2 \log (c+d x)}{d}+(2 a b) \int \frac {\sinh (e+f x)}{c+d x} \, dx+b^2 \int \frac {\sinh ^2(e+f x)}{c+d x} \, dx\\ &=\frac {a^2 \log (c+d x)}{d}-b^2 \int \left (\frac {1}{2 (c+d x)}-\frac {\cosh (2 e+2 f x)}{2 (c+d x)}\right ) \, dx+\left (2 a b \cosh \left (e-\frac {c f}{d}\right )\right ) \int \frac {\sinh \left (\frac {c f}{d}+f x\right )}{c+d x} \, dx+\left (2 a b \sinh \left (e-\frac {c f}{d}\right )\right ) \int \frac {\cosh \left (\frac {c f}{d}+f x\right )}{c+d x} \, dx\\ &=\frac {a^2 \log (c+d x)}{d}-\frac {b^2 \log (c+d x)}{2 d}+\frac {2 a b \text {Chi}\left (\frac {c f}{d}+f x\right ) \sinh \left (e-\frac {c f}{d}\right )}{d}+\frac {2 a b \cosh \left (e-\frac {c f}{d}\right ) \text {Shi}\left (\frac {c f}{d}+f x\right )}{d}+\frac {1}{2} b^2 \int \frac {\cosh (2 e+2 f x)}{c+d x} \, dx\\ &=\frac {a^2 \log (c+d x)}{d}-\frac {b^2 \log (c+d x)}{2 d}+\frac {2 a b \text {Chi}\left (\frac {c f}{d}+f x\right ) \sinh \left (e-\frac {c f}{d}\right )}{d}+\frac {2 a b \cosh \left (e-\frac {c f}{d}\right ) \text {Shi}\left (\frac {c f}{d}+f x\right )}{d}+\frac {1}{2} \left (b^2 \cosh \left (2 e-\frac {2 c f}{d}\right )\right ) \int \frac {\cosh \left (\frac {2 c f}{d}+2 f x\right )}{c+d x} \, dx+\frac {1}{2} \left (b^2 \sinh \left (2 e-\frac {2 c f}{d}\right )\right ) \int \frac {\sinh \left (\frac {2 c f}{d}+2 f x\right )}{c+d x} \, dx\\ &=\frac {b^2 \cosh \left (2 e-\frac {2 c f}{d}\right ) \text {Chi}\left (\frac {2 c f}{d}+2 f x\right )}{2 d}+\frac {a^2 \log (c+d x)}{d}-\frac {b^2 \log (c+d x)}{2 d}+\frac {2 a b \text {Chi}\left (\frac {c f}{d}+f x\right ) \sinh \left (e-\frac {c f}{d}\right )}{d}+\frac {2 a b \cosh \left (e-\frac {c f}{d}\right ) \text {Shi}\left (\frac {c f}{d}+f x\right )}{d}+\frac {b^2 \sinh \left (2 e-\frac {2 c f}{d}\right ) \text {Shi}\left (\frac {2 c f}{d}+2 f x\right )}{2 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.29, size = 134, normalized size = 0.86 \[ \frac {2 a^2 \log (c+d x)+4 a b \text {Chi}\left (f \left (\frac {c}{d}+x\right )\right ) \sinh \left (e-\frac {c f}{d}\right )+4 a b \cosh \left (e-\frac {c f}{d}\right ) \text {Shi}\left (f \left (\frac {c}{d}+x\right )\right )+b^2 \text {Chi}\left (\frac {2 f (c+d x)}{d}\right ) \cosh \left (2 e-\frac {2 c f}{d}\right )+b^2 \sinh \left (2 e-\frac {2 c f}{d}\right ) \text {Shi}\left (\frac {2 f (c+d x)}{d}\right )-b^2 \log (c+d x)}{2 d} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Sinh[e + f*x])^2/(c + d*x),x]

[Out]

(b^2*Cosh[2*e - (2*c*f)/d]*CoshIntegral[(2*f*(c + d*x))/d] + 2*a^2*Log[c + d*x] - b^2*Log[c + d*x] + 4*a*b*Cos
hIntegral[f*(c/d + x)]*Sinh[e - (c*f)/d] + 4*a*b*Cosh[e - (c*f)/d]*SinhIntegral[f*(c/d + x)] + b^2*Sinh[2*e -
(2*c*f)/d]*SinhIntegral[(2*f*(c + d*x))/d])/(2*d)

________________________________________________________________________________________

fricas [A]  time = 0.89, size = 232, normalized size = 1.49 \[ \frac {4 \, {\left (a b {\rm Ei}\left (\frac {d f x + c f}{d}\right ) - a b {\rm Ei}\left (-\frac {d f x + c f}{d}\right )\right )} \cosh \left (-\frac {d e - c f}{d}\right ) + {\left (b^{2} {\rm Ei}\left (\frac {2 \, {\left (d f x + c f\right )}}{d}\right ) + b^{2} {\rm Ei}\left (-\frac {2 \, {\left (d f x + c f\right )}}{d}\right )\right )} \cosh \left (-\frac {2 \, {\left (d e - c f\right )}}{d}\right ) + 2 \, {\left (2 \, a^{2} - b^{2}\right )} \log \left (d x + c\right ) - 4 \, {\left (a b {\rm Ei}\left (\frac {d f x + c f}{d}\right ) + a b {\rm Ei}\left (-\frac {d f x + c f}{d}\right )\right )} \sinh \left (-\frac {d e - c f}{d}\right ) - {\left (b^{2} {\rm Ei}\left (\frac {2 \, {\left (d f x + c f\right )}}{d}\right ) - b^{2} {\rm Ei}\left (-\frac {2 \, {\left (d f x + c f\right )}}{d}\right )\right )} \sinh \left (-\frac {2 \, {\left (d e - c f\right )}}{d}\right )}{4 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sinh(f*x+e))^2/(d*x+c),x, algorithm="fricas")

[Out]

1/4*(4*(a*b*Ei((d*f*x + c*f)/d) - a*b*Ei(-(d*f*x + c*f)/d))*cosh(-(d*e - c*f)/d) + (b^2*Ei(2*(d*f*x + c*f)/d)
+ b^2*Ei(-2*(d*f*x + c*f)/d))*cosh(-2*(d*e - c*f)/d) + 2*(2*a^2 - b^2)*log(d*x + c) - 4*(a*b*Ei((d*f*x + c*f)/
d) + a*b*Ei(-(d*f*x + c*f)/d))*sinh(-(d*e - c*f)/d) - (b^2*Ei(2*(d*f*x + c*f)/d) - b^2*Ei(-2*(d*f*x + c*f)/d))
*sinh(-2*(d*e - c*f)/d))/d

________________________________________________________________________________________

giac [A]  time = 0.29, size = 148, normalized size = 0.95 \[ \frac {b^{2} {\rm Ei}\left (-\frac {2 \, {\left (d f x + c f\right )}}{d}\right ) e^{\left (\frac {2 \, c f}{d} - 2 \, e\right )} - 4 \, a b {\rm Ei}\left (-\frac {d f x + c f}{d}\right ) e^{\left (\frac {c f}{d} - e\right )} + 4 \, a b {\rm Ei}\left (\frac {d f x + c f}{d}\right ) e^{\left (-\frac {c f}{d} + e\right )} + b^{2} {\rm Ei}\left (\frac {2 \, {\left (d f x + c f\right )}}{d}\right ) e^{\left (-\frac {2 \, c f}{d} + 2 \, e\right )} + 4 \, a^{2} \log \left (d x + c\right ) - 2 \, b^{2} \log \left (d x + c\right )}{4 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sinh(f*x+e))^2/(d*x+c),x, algorithm="giac")

[Out]

1/4*(b^2*Ei(-2*(d*f*x + c*f)/d)*e^(2*c*f/d - 2*e) - 4*a*b*Ei(-(d*f*x + c*f)/d)*e^(c*f/d - e) + 4*a*b*Ei((d*f*x
 + c*f)/d)*e^(-c*f/d + e) + b^2*Ei(2*(d*f*x + c*f)/d)*e^(-2*c*f/d + 2*e) + 4*a^2*log(d*x + c) - 2*b^2*log(d*x
+ c))/d

________________________________________________________________________________________

maple [A]  time = 0.19, size = 201, normalized size = 1.29 \[ -\frac {a b \,{\mathrm e}^{-\frac {c f -d e}{d}} \Ei \left (1, -f x -e -\frac {c f -d e}{d}\right )}{d}+\frac {a^{2} \ln \left (d x +c \right )}{d}-\frac {b^{2} \ln \left (d x +c \right )}{2 d}-\frac {b^{2} {\mathrm e}^{\frac {2 c f -2 d e}{d}} \Ei \left (1, 2 f x +2 e +\frac {2 c f -2 d e}{d}\right )}{4 d}-\frac {b^{2} {\mathrm e}^{-\frac {2 \left (c f -d e \right )}{d}} \Ei \left (1, -2 f x -2 e -\frac {2 \left (c f -d e \right )}{d}\right )}{4 d}+\frac {a b \,{\mathrm e}^{\frac {c f -d e}{d}} \Ei \left (1, f x +e +\frac {c f -d e}{d}\right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*sinh(f*x+e))^2/(d*x+c),x)

[Out]

-a*b/d*exp(-(c*f-d*e)/d)*Ei(1,-f*x-e-(c*f-d*e)/d)+a^2*ln(d*x+c)/d-1/2*b^2*ln(d*x+c)/d-1/4*b^2/d*exp(2*(c*f-d*e
)/d)*Ei(1,2*f*x+2*e+2*(c*f-d*e)/d)-1/4*b^2/d*exp(-2*(c*f-d*e)/d)*Ei(1,-2*f*x-2*e-2*(c*f-d*e)/d)+a*b/d*exp((c*f
-d*e)/d)*Ei(1,f*x+e+(c*f-d*e)/d)

________________________________________________________________________________________

maxima [A]  time = 0.40, size = 148, normalized size = 0.95 \[ -\frac {1}{4} \, b^{2} {\left (\frac {e^{\left (-2 \, e + \frac {2 \, c f}{d}\right )} E_{1}\left (\frac {2 \, {\left (d x + c\right )} f}{d}\right )}{d} + \frac {e^{\left (2 \, e - \frac {2 \, c f}{d}\right )} E_{1}\left (-\frac {2 \, {\left (d x + c\right )} f}{d}\right )}{d} + \frac {2 \, \log \left (d x + c\right )}{d}\right )} + a b {\left (\frac {e^{\left (-e + \frac {c f}{d}\right )} E_{1}\left (\frac {{\left (d x + c\right )} f}{d}\right )}{d} - \frac {e^{\left (e - \frac {c f}{d}\right )} E_{1}\left (-\frac {{\left (d x + c\right )} f}{d}\right )}{d}\right )} + \frac {a^{2} \log \left (d x + c\right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sinh(f*x+e))^2/(d*x+c),x, algorithm="maxima")

[Out]

-1/4*b^2*(e^(-2*e + 2*c*f/d)*exp_integral_e(1, 2*(d*x + c)*f/d)/d + e^(2*e - 2*c*f/d)*exp_integral_e(1, -2*(d*
x + c)*f/d)/d + 2*log(d*x + c)/d) + a*b*(e^(-e + c*f/d)*exp_integral_e(1, (d*x + c)*f/d)/d - e^(e - c*f/d)*exp
_integral_e(1, -(d*x + c)*f/d)/d) + a^2*log(d*x + c)/d

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {{\left (a+b\,\mathrm {sinh}\left (e+f\,x\right )\right )}^2}{c+d\,x} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*sinh(e + f*x))^2/(c + d*x),x)

[Out]

int((a + b*sinh(e + f*x))^2/(c + d*x), x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (a + b \sinh {\left (e + f x \right )}\right )^{2}}{c + d x}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sinh(f*x+e))**2/(d*x+c),x)

[Out]

Integral((a + b*sinh(e + f*x))**2/(c + d*x), x)

________________________________________________________________________________________